home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / util / cli / select14.lha / Select_E.doc < prev    next >
Encoding:
Text File  |  1992-05-19  |  6.2 KB  |  202 lines

  1.  
  2.  
  3.  
  4.                      Select 1.4
  5.  
  6.               by  V.Gervasi - ICARUS
  7.  
  8.  
  9.  
  10.    Introduction
  11.   --------------
  12.  
  13.   Did  you  ever wanted to perform some operation on your files, let's say
  14. compress,  rename  or  delete  them,  and that all files matched a certain
  15. pattern...  but one or two ? Or wanted to archive all files matching #?.c,
  16. but  that  bstro_tab.bin,  too, and no other #?.bin ? Did you ever need to
  17. remove some file from two or more directories ?
  18.  
  19.   Or  let's  say  that,  while you are writing a certain shell script, you
  20. want  to  allow  the  user  to  select  a  file from a certain list (e.g.,
  21. devs:#?.device): what do you do ?
  22.  
  23.   In  any  of this cases, Select/Except is the right tool for the job. You
  24. only need AmigaOS 2.0 or later.
  25.  
  26.  
  27.  
  28.    Distribution
  29.   --------------
  30.  
  31.   Select is not shareware, strictly speaking, and is NOT public domain.
  32.   Select is (C) Copyright 1991 V.Gervasi - ICARUS.
  33.  
  34.   However,  you  can  freely distribute it, with the only restriction that
  35. you  cannot  obtain any profit greater than the bare duplication and media
  36. cost (i.e., no more than $4.-).
  37.  
  38.   In  any  case,  the Select executable, the icon Select.info, the Install
  39. script  and  this  document, Select.doc, must be distributed together, not
  40. necessarily  in  their  original  .lzh  archive,  but  in  their original,
  41. unmodified form.
  42.  
  43.   You don't need to pay to use Select; however, a contribution is welcome.
  44. If  you  get  10 bucks, put them in an envelope and send it to the Author,
  45. you will merit his grateful wishes and, probably, an updated version.
  46.  
  47.   I beleive that this distribution policy is quite reasonable; let me know
  48. your opinion !
  49.  
  50.  
  51.    Installation
  52.   --------------
  53.  
  54.   Just issue "execute Install" or, if you use AmigaShell, simply "Install".
  55.  
  56.   The  script  will prompt you for a directory in which to install Select;
  57. the remaining actions are automatic.
  58.  
  59.  
  60.    Select or Except ?
  61.   --------------------
  62.  
  63.   Actually,  this  program  is two programs. Or, better, this two programs
  64. are  the  same  program. Oh,  well,  the  program,  once  run, will behave
  65. differently depending on the name it had when run:
  66.  
  67.  - Select   Will select from the files matching the given pattern;
  68.  - Except   Will select from the files NOT matching the given pattern.
  69.  
  70.   The  included  script,  Install, takes care of performing a MAKELINK, so
  71. that  you  can  have both programs without wasting twice the space on your
  72. disk.
  73.  
  74.   In the following, we will refer to Select, but Except behaves exactly in
  75. the same way.
  76.  
  77.  
  78.    Syntax
  79.   --------
  80.  
  81.   The syntax is quite simple:
  82.  
  83.     SELECT <command line with pattern>
  84.  
  85.   Here, <command line> is exactly the same you should issue to execute the
  86. required  command,  with  the  only  exception  that you can use a pattern
  87. whereas you would have used a file name.
  88.  
  89.  
  90.   Examples:
  91.  
  92.     select copy df0:#? df1:
  93.  
  94.       Copies the files you will select from df0: to df1:
  95.  
  96.     select type #?.doc
  97.  
  98.         Types the files you will select, chosen among those whose name
  99.     ends in ".doc".
  100.  
  101.     select delete #?read#?me#?
  102.  
  103.         Deletes all files you will select, chosen among those whose name
  104.     contains "read" and "me", in that order.
  105.  
  106.   The  first  AmigaDOS pattern in the <command line> is used to select the
  107. files  that  will  appear in list. You can select any number of files from
  108. this list, or add other files.
  109.  
  110.  
  111.    Select's Interface
  112.   --------------------
  113.  
  114.   Select's  window  contains a file list (corresponding to the pattern) on
  115. which  you  can  operate,  a single line containing a copy of the <command
  116. line> and 6 command buttons.
  117.  
  118.   You  can  select  a  file  from the list simply by clicking on his name;
  119. beside  the  name  will  appear  a  ">>" symbol. As usual, you can use the
  120. scrolling bar to see the entire list.
  121.  
  122.   The  "All"  button  selects  all  the  files from the list, while "None"
  123. deselect  them  all.  "Invert" deselects all currently selected files, and
  124. selects  those  not  selected. The "Separate" button is a cycle button: by
  125. clicking  on  it once, the label becomes "Together", by clicking again, it
  126. returs "Separate".
  127.  
  128.   In  the "Together" position, only one command will be executed, with all
  129. selected names pasted in place of the pattern; in the "Separate" position,
  130. one  instance of the command for each selected name will be fired. Keep in
  131. mind that (almost) every Shell has a limit on the maximum length allowable
  132. for  a  command  line;  with  the  "Together"  mode  it  is  quite easy to
  133. exaggerate !
  134.  
  135.   The "EXECUTE" button will finally starts the command on the bottom line.
  136.  
  137.   Last  but  not  least,  the  "?"  button will allow you to add files not
  138. included  in  the  list. When you press it, the system file requester will
  139. appear, with the option to select one or more files from any directory.
  140.  
  141.   The  bottom  line,  containing the command, may be edited. In such case,
  142. the file list is rebuilt: you will loose any current selection.
  143.  
  144.  
  145.    Other details
  146.   ---------------
  147.  
  148.   In  the  "Separate"  mode, Select can build more complex commands. Every
  149. time  the  command  line  contains  a  particular  code  (%x), Select will
  150. substitute a part of the file name:
  151.  
  152.  
  153.     The code        Produces
  154.     --------        --------
  155.     %P or %p        the file's path
  156.     %N or %n        the file's name
  157.     %B or %b        the file's "base name",
  158.                     i.e., without extension
  159.     %E or %e        the file's extension
  160.      %...            ... [the same character]
  161.  
  162. Examples:
  163.  
  164.     select rename #?.asm to %b.s         [tol.asm->tol.s, h.asm->h.s]
  165.  
  166.     select rename foo.#? to bar%e         [foo.c->bar.c, foo.h->bar.h]
  167.  
  168.     select copy SRC:#?.(c|h) RAM:old_%n  [SRC:sel.c->RAM:old_sel.c]
  169.  
  170.     select rename #?.#? %e,%b         [bubble.bas->.bas,bubble]
  171.  
  172.     select rename #? %%e%b             [plot.bas->%eplot]
  173.  
  174.  
  175.   In the "Together" mode, the symbol "%" has no particular significance.
  176.  
  177.  
  178.  
  179.    Final considerations
  180.   ----------------------
  181.  
  182.   If  you work a lot with a Shell, this program may prove helpful. Had you
  183. liked  it,  or had you not, let me know ! Constructive criticism is always
  184. welcome.
  185.  
  186.   You can send any remark to
  187.  
  188.     Fido:    Vincenzo Gervasi, 2:33/800.21
  189.     UUCP:    [uunet|pyramid|rutgers]!cbmvax!cbmehq!cbmita!icarus!vigi
  190.     Internet:    tse10@gladio.di.unipi.it  (until July 92)
  191.             vigi@wolf.sublink.org
  192.             cbmehq!cbmita!icarus!vigi@cbmvax.commodore.com
  193.  
  194.   Remarks and contribution (let's say $10) may be sent to
  195.  
  196.  
  197.     Vincenzo Gervasi
  198.     via Notai, 11
  199.     I-56126 Pisa (Italy)
  200.  
  201.  
  202.